package com.juyu.miliao.scheduler.service;

import com.juyu.miliao.scheduler.dao.mysql.NewUserRobotMessageDao;
import com.juyu.miliao.scheduler.domin.SendRobot;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class NewUserRobotMessageService {
    @Resource
    private NewUserRobotMessageDao newUserRobotMessageDao;


    @Cacheable(value = "getSendRobot", key = "T(String).valueOf(#isOnLine)")
    public List<SendRobot>  getSendRobot(int isOnLine){
        return newUserRobotMessageDao.findSendRobotByIsOnLine(isOnLine);
    }
}
